//
// Created by yinlijun on 17-9-30.
//

#ifndef ROCKYSOCKET_ROCKY_CLIENT_H
#define ROCKYSOCKET_ROCKY_CLIENT_H


#include "../common/rocky_connection.h"

#ifdef __cplusplus
extern "C" {
#endif

struct RockyClient;

typedef struct RockyClient RockyClient;

RockyClient *rocky_client_create(size_t buf_size, on_received_data on_received,
                                 on_connection_disconnected on_disconnected);

void rocky_client_write_data(RockyClient *thiz, void *data, size_t data_size);

int rocky_client_loop(RockyClient *thiz);

int rocky_client_destroy(RockyClient *thiz);

#ifdef __cplusplus
}
#endif


#endif //ROCKYSOCKET_ROCKY_CLIENT_H
